import request from './request'

// 验证码API
export const captchaApi = {
  // 获取验证码图片
  getCaptchaImage() {
    return request({
      url: '/captcha/generate',
      method: 'get',
      responseType: 'blob' // 重要：设置响应类型为blob
    })
  },

  // 验证验证码
  verifyCaptcha(captcha) {
    return request({
      url: '/captcha/verify',
      method: 'post',
      data: { captcha }
    })
  }
} 